package org.pettyfox.pfpay.entity;

import java.math.BigDecimal;
import java.util.Date;
import javax.persistence.*;

@Table(name = "pay_alone")
public class PayAlone {
    @Id
    private Integer id;

    /**
     * 收款类型[wx(0):微信, zhifubao(1):支付宝]
     */
    private Byte type;

    /**
     * 收款人
     */
    private String payee;

    /**
     * 应收款金额
     */
    @Column(name = "behoove_amount")
    private BigDecimal behooveAmount;

    /**
     * 实际收款金额，单位元，最小精度分，RMB
     */
    @Column(name = "real_amount")
    private BigDecimal realAmount;

    /**
     * 支付链接，二维码，收款码
     */
    @Column(name = "pay_link")
    private String payLink;

    @Column(name = "create_time")
    private Date createTime;

    @Column(name = "update_time")
    private Date updateTime;

    private String remarks;

    /**
     * 是否启用[disenable(0):禁用, enable(1):启用]
     */
    private Byte enable;

    /**
     * @return id
     */
    public Integer getId() {
        return id;
    }

    /**
     * @param id
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * 获取收款类型[wx(0):微信, zhifubao(1):支付宝]
     *
     * @return type - 收款类型[wx(0):微信, zhifubao(1):支付宝]
     */
    public Byte getType() {
        return type;
    }

    /**
     * 设置收款类型[wx(0):微信, zhifubao(1):支付宝]
     *
     * @param type 收款类型[wx(0):微信, zhifubao(1):支付宝]
     */
    public void setType(Byte type) {
        this.type = type;
    }

    /**
     * 获取收款人
     *
     * @return payee - 收款人
     */
    public String getPayee() {
        return payee;
    }

    /**
     * 设置收款人
     *
     * @param payee 收款人
     */
    public void setPayee(String payee) {
        this.payee = payee;
    }

    /**
     * 获取应收款金额
     *
     * @return behoove_amount - 应收款金额
     */
    public BigDecimal getBehooveAmount() {
        return behooveAmount;
    }

    /**
     * 设置应收款金额
     *
     * @param behooveAmount 应收款金额
     */
    public void setBehooveAmount(BigDecimal behooveAmount) {
        this.behooveAmount = behooveAmount;
    }

    /**
     * 获取实际收款金额，单位元，最小精度分，RMB
     *
     * @return real_amount - 实际收款金额，单位元，最小精度分，RMB
     */
    public BigDecimal getRealAmount() {
        return realAmount;
    }

    /**
     * 设置实际收款金额，单位元，最小精度分，RMB
     *
     * @param realAmount 实际收款金额，单位元，最小精度分，RMB
     */
    public void setRealAmount(BigDecimal realAmount) {
        this.realAmount = realAmount;
    }

    /**
     * 获取支付链接，二维码，收款码
     *
     * @return pay_link - 支付链接，二维码，收款码
     */
    public String getPayLink() {
        return payLink;
    }

    /**
     * 设置支付链接，二维码，收款码
     *
     * @param payLink 支付链接，二维码，收款码
     */
    public void setPayLink(String payLink) {
        this.payLink = payLink;
    }

    /**
     * @return create_time
     */
    public Date getCreateTime() {
        return createTime;
    }

    /**
     * @param createTime
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    /**
     * @return update_time
     */
    public Date getUpdateTime() {
        return updateTime;
    }

    /**
     * @param updateTime
     */
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    /**
     * @return remarks
     */
    public String getRemarks() {
        return remarks;
    }

    /**
     * @param remarks
     */
    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }

    /**
     * 获取是否启用[disenable(0):禁用, enable(1):启用]
     *
     * @return enable - 是否启用[disenable(0):禁用, enable(1):启用]
     */
    public Byte getEnable() {
        return enable;
    }

    /**
     * 设置是否启用[disenable(0):禁用, enable(1):启用]
     *
     * @param enable 是否启用[disenable(0):禁用, enable(1):启用]
     */
    public void setEnable(Byte enable) {
        this.enable = enable;
    }

    public static PayAlone.Builder builder() {
        return new PayAlone.Builder();
    }

    public static class Builder {
        private PayAlone obj;

        public Builder() {
            this.obj = new PayAlone();
        }

        /**
         * @param id
         */
        public Builder id(Integer id) {
            obj.setId(id);
            return this;
        }

        /**
         * 设置收款类型[wx(0):微信, zhifubao(1):支付宝]
         *
         * @param type 收款类型[wx(0):微信, zhifubao(1):支付宝]
         */
        public Builder type(Byte type) {
            obj.setType(type);
            return this;
        }

        /**
         * 设置收款人
         *
         * @param payee 收款人
         */
        public Builder payee(String payee) {
            obj.setPayee(payee);
            return this;
        }

        /**
         * 设置应收款金额
         *
         * @param behooveAmount 应收款金额
         */
        public Builder behooveAmount(BigDecimal behooveAmount) {
            obj.setBehooveAmount(behooveAmount);
            return this;
        }

        /**
         * 设置实际收款金额，单位元，最小精度分，RMB
         *
         * @param realAmount 实际收款金额，单位元，最小精度分，RMB
         */
        public Builder realAmount(BigDecimal realAmount) {
            obj.setRealAmount(realAmount);
            return this;
        }

        /**
         * 设置支付链接，二维码，收款码
         *
         * @param payLink 支付链接，二维码，收款码
         */
        public Builder payLink(String payLink) {
            obj.setPayLink(payLink);
            return this;
        }

        /**
         * @param createTime
         */
        public Builder createTime(Date createTime) {
            obj.setCreateTime(createTime);
            return this;
        }

        /**
         * @param updateTime
         */
        public Builder updateTime(Date updateTime) {
            obj.setUpdateTime(updateTime);
            return this;
        }

        /**
         * @param remarks
         */
        public Builder remarks(String remarks) {
            obj.setRemarks(remarks);
            return this;
        }

        /**
         * 设置是否启用[disenable(0):禁用, enable(1):启用]
         *
         * @param enable 是否启用[disenable(0):禁用, enable(1):启用]
         */
        public Builder enable(Byte enable) {
            obj.setEnable(enable);
            return this;
        }

        public PayAlone build() {
            return this.obj;
        }
    }

    public enum Type {
        WX(new Byte("0"), "微信"),
        ZHIFUBAO(new Byte("1"), "支付宝");

        private final Byte value;

        private final String name;

        Type(Byte value, String name) {
            this.value = value;
            this.name = name;
        }

        public Byte getValue() {
            return this.value;
        }

        public Byte value() {
            return this.value;
        }

        public String getName() {
            return this.name;
        }
    }

    public enum Enable {
        DISENABLE(new Byte("0"), "禁用"),
        ENABLE(new Byte("1"), "启用");

        private final Byte value;

        private final String name;

        Enable(Byte value, String name) {
            this.value = value;
            this.name = name;
        }

        public Byte getValue() {
            return this.value;
        }

        public Byte value() {
            return this.value;
        }

        public String getName() {
            return this.name;
        }
    }
}